/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.worsik.vypocty.topeni.tepelneztraty.model;

import cz.worsik.vypocty.topeni.tepelneztraty.codetables.Invisible;

/**
 *
 * @author 231260
 */
public class Obecny {
	
	/** Identifikator (primarni klic). */
    @Invisible
	protected Long id;

	public Obecny(Long id) {
		super();
		this.id = id;
	}

	public Obecny() {
		super();
	}
	
	@Override
	public boolean equals(Object obj)
	{
		if (this == obj)
			return true;
		else if (obj == null)
			return false;
		else if (getClass() != obj.getClass())
			return false;
		
		Obecny druhy = (Obecny) obj;
		
		// jsou rovny, pokud se jejich ID rovnaji
		return getId() == druhy.getId();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
}
